<?php /* Smarty version 2.6.16, created on 2012-10-06 14:12:44
         compiled from coach_game.tpl */ ?>
<div id="paging">

<div align="right">
	<?php if ($this->_tpl_vars['is_coach'] == '0'): ?>
	<!--label>Become a Coach :</label> <input type="radio" name="user_type" value="1" onclick="coach_game()" /-->
	<a class="button" href="coach_game_update.php?profile=Y"><span>Become a Coach</span></a>
	<?php endif; ?>
	<?php if ($this->_tpl_vars['is_partner'] == '0'): ?>
	<a class="button" href="training_partner_game_update.php?profile=Y">Become Training Partner</a>
	<!--label>Become a Training Partner :</label> <input type="radio" name="user_type" value="3" onclick="tp_game()"/-->
	<?php endif; ?> 
</div>
<div class="content">	
		
				<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'user_tabs.tpl', 'smarty_include_vars' => array('active_tab' => 'coach')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
				
		<div class="clear"></div>
		<div class="tabular-content"> 
		
			<div class="tab_sub">
            	<ul>
					<li><a href="calendar.php">Availability</a></li>
                    <li><a href="javascript:;" class="active">My Games</a></li>
					<li><a href="add_lesson.php" >My lessons</a></li>
                </ul>
			</div>
			<div class="total-message">
			<a href="coach_game_update.php" class="button">Add Game</a>&nbsp;
			<strong>Total Games : <?php echo $this->_tpl_vars['Numcoachgame']; ?>
</strong>&nbsp;&nbsp;
			</div> 
			<div class="clear"></div>                     
			<div>
	  
				<?php if ($this->_tpl_vars['Numcoachgame'] > 0): ?>
					<?php unset($this->_sections['gameRow']);
$this->_sections['gameRow']['name'] = 'gameRow';
$this->_sections['gameRow']['loop'] = is_array($_loop=$this->_tpl_vars['CoachgameArr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['gameRow']['show'] = true;
$this->_sections['gameRow']['max'] = $this->_sections['gameRow']['loop'];
$this->_sections['gameRow']['step'] = 1;
$this->_sections['gameRow']['start'] = $this->_sections['gameRow']['step'] > 0 ? 0 : $this->_sections['gameRow']['loop']-1;
if ($this->_sections['gameRow']['show']) {
    $this->_sections['gameRow']['total'] = $this->_sections['gameRow']['loop'];
    if ($this->_sections['gameRow']['total'] == 0)
        $this->_sections['gameRow']['show'] = false;
} else
    $this->_sections['gameRow']['total'] = 0;
if ($this->_sections['gameRow']['show']):

            for ($this->_sections['gameRow']['index'] = $this->_sections['gameRow']['start'], $this->_sections['gameRow']['iteration'] = 1;
                 $this->_sections['gameRow']['iteration'] <= $this->_sections['gameRow']['total'];
                 $this->_sections['gameRow']['index'] += $this->_sections['gameRow']['step'], $this->_sections['gameRow']['iteration']++):
$this->_sections['gameRow']['rownum'] = $this->_sections['gameRow']['iteration'];
$this->_sections['gameRow']['index_prev'] = $this->_sections['gameRow']['index'] - $this->_sections['gameRow']['step'];
$this->_sections['gameRow']['index_next'] = $this->_sections['gameRow']['index'] + $this->_sections['gameRow']['step'];
$this->_sections['gameRow']['first']      = ($this->_sections['gameRow']['iteration'] == 1);
$this->_sections['gameRow']['last']       = ($this->_sections['gameRow']['iteration'] == $this->_sections['gameRow']['total']);
?>
						<div class="profile-list" <?php if ($this->_sections['gameRow']['index']%2 != 0): ?>style="background-color:#f2f2f2;"<?php endif; ?>>
							<div class="game-details" <?php if ($this->_sections['gameRow']['index']%2 != 0): ?>style="background-color:#f2f2f2;"<?php endif; ?> >
								<h2><?php echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['game']; ?>
</h2>
								<div class="coach_game_details" style="margin-top: 10px;margin-left: 10px;">
									<dl>
										<dt>1hr:</dt>
										<dd><?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['rate_A'] != ''):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['rate_A']; ?>
pts<?php endif; ?></dd>
									</dl>
									<dl>
										<dt>2hr:</dt>
										<dd><?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['rate_B'] != ''):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['rate_B']; ?>
pts<?php endif; ?></dd>
									</dl>
									<dl>
										<dt>3hr:</dt>
										<dd><?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['rate_C'] != ''):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['rate_C']; ?>
pts<?php endif; ?></dd>
									</dl>
									<?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['is_ladder'] == 'Y'): ?>
									<dl>
										<dt>Ladder:</dt>
										<dd><?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['ladder'] != ''):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['ladder'];  else: ?>N/A<?php endif; ?></dd>
									</dl>
									<?php endif; ?>
									<?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['is_server'] == 'Y'): ?>
									<dl>
										<dt>Server:</dt>
										<dd><?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['server']):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['server'];  else: ?>N/A<?php endif; ?></dd>
									</dl>
									<?php endif; ?>
									<?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['is_region'] == 'Y'): ?>
									<dl>
										<dt>Region:</dt>
										<dd><?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['region']):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['region'];  else: ?>N/A<?php endif; ?></dd>
									</dl>
									<?php endif; ?>
									
									<?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['is_race'] == 'Y'): ?>
									<dl>
										<dt>Race:</dt>
										<dd><?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['region']):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['region'];  else: ?>N/A<?php endif; ?></dd>
									</dl>
									<?php endif; ?>
									
									<?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['is_rating'] == 'Y'): ?>
									<dl>
										<dt>Rating:</dt>
										<dd><?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['rating']):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['rating'];  else: ?>N/A<?php endif; ?></dd>
									</dl>
									<?php endif; ?>
									<dl>
										<dt>Experience:</dt>
										<dd><?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['experience'] != ''):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['experience'];  else: ?>N/A<?php endif; ?></dd>
									</dl>
								</div>
								
								<p class="clear"></p>
								<div style="height:10px;"></div>
								<div class="clear"></div>
									
							</div>
							<div class="clear"></div>
							
							<div style="float:right; margin-bottom: 15px; margin-right: 90px">
								<div class="" style="float:right;">
									<a class="button" href="#" onclick="ConfirmDelete('<?php echo $this->_tpl_vars['page_name']; ?>
?action=del','<?php echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['user_game_id']; ?>
','<?php echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['game']; ?>
','Your selected game:: ')">
										Delete
									</a>
								</div>
								<div class="" style="margin-right:5px;float:right;">
									<a class="button" href="coach_game_update.php?user_game_id=<?php echo $this->_tpl_vars['CoachgameArr'][$this->_sections['gameRow']['index']]['user_game_id']; ?>
">
										Edit
									</a>
								</div>
							</div>
							<div class="clear"></div>
						</div>
					<?php endfor; endif; ?>
				<?php else: ?>
					<div class="profile-list">
						<div class="game-details"> No game found </div>
					</div>
				<?php endif; ?>
			  <div class="clear"></div>
			</div>
		</div>
   </div>
 </div>     